<div class="vcalendar">

<?php  
	$sqleduc = ("SELECT user_id FROM ".mysql_real_escape_string($table_name)." WHERE user_name='".mysql_real_escape_string($_SESSION[logname])."' ");
	$uid = mysql_query($sqleduc) or die('impossible de selectionner user_id - '.mysql_error());
	$uid = mysql_fetch_array($uid);
	
	$sqleduc2 = ("SELECT * FROM ".mysql_real_escape_string($table_educ)." WHERE user_id='".mysql_real_escape_string($uid[0])."' ");
	$feduc = mysql_query($sqleduc2) or die('impossible de selectionner dans educ - '.mysql_error());
	$nb = 1;
?>
<script type="text/javascript">
		//<![CDATA[
		$(document).ready(function(){
			$(".edc").each(function(){
				$(this).show();
			});
		});
		//]]>
	</script>
<?php	
	while ($itemeduc = mysql_fetch_array($feduc) )
	{
?>
	<div id="educ" class="education vevent edc">

		<label for="org_<?php echo $nb; ?>" class="preField">R&eacute;sum&eacute;:</label>
		<input type="text" size="31" name="org_<?php echo $nb; ?>" value="<?php echo $itemeduc['summary']; ?>" />
		<span class="reqMark"><img src="img/action_stop.gif" class="close_box" /></span><br/>

		<label for="dtstart_<?php echo $nb; ?>" class="preField">Date du:</label>
		<input type="date" size="12" name="dtstart_<?php echo $nb; ?>" class="dtdate top5" value="<?php echo $itemeduc['dtstart']; ?>" /> au 
		<input type="date" size="12" name="dtend_<?php echo $nb; ?>" class="dtdate" value="<?php echo $itemeduc['dtend']; ?>" />
	
	
	
	</div>	

<?php
	$nb++;
	}
	if ( $nb < 5 )
	{
		$nb2--;
		for ( $i=$nb; $i < 5 ; $i++ )
		{ 
			?>
	<div id="educ" class="education vevent">

		<label for="org_<?php echo $i; ?>" class="preField">R&eacute;sum&eacute;:</label>
		<input type="text" size="31" name="org_<?php echo $i; ?>" value="" />
		<span class="reqMark"><img src="img/action_stop.gif" class="close_box" /></span><br/>

		<label for="dtstart_<?php echo $i; ?>" class="preField">Date du:</label>
		<input type="date" size="12" name="dtstart_<?php echo $i; ?>" class="dtdate top5" value="" /> au 
		<input type="date" size="12" name="dtend_<?php echo $i; ?>" class="dtdate" value="" />

	</div>
			
			<?php
		}
	}
	
?>

	<span class="addEduc"> (ajouter un bloc)</span>	<br/>
	<input type="submit" name="modifEducation" value="Envoyer" />
</div>